package com.leyou.item.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/api/ceshi")
public class CeShiController {

    //文件上传
    @PostMapping("/file")
    public void upLoadFile(MultipartFile[] file ){

        //如果单文件上传就用MultipartFile,多文件上传就用MultipartFile[]
        for (MultipartFile f : file) {
//            f.transferTo();
        }
    }
}
